All Questions
7 questions
1vote
2answers
81views
Extracting items from comma/semicolon-delimited strings, discarding parts after a hyphen
New Scala dev here. Is there a more idiomatic or efficient way to accomplish this in Scala? Given a list of the following strings, I need to obtain the unique 'main parts' once any parts including ...
3votes
2answers
4kviews
Separate an email address into its username and domain name
This is my first ever Python program and I wanted to get everyone's opinions on it. The goal of the program is to separate an email address into its username and domain name. ...
2votes
1answer
1kviews
(Codewars): Find the Unknown Digit
Kata: https://www.codewars.com/kata/find-the-unknown-digit/train/python To give credit where credit is due: This problem was taken from the ACMICPC-Northwest Regional Programming Contest. Thank ...
7votes
3answers
6kviews
Splitting std::string based on delimiter using only find and substr
I have been playing around with these two functions for a bit, dunno if this is practical though. I have only been learning C++ for a couple of days, coming from a Java background. There we had a ...
4votes
2answers
2kviews
Compare two CSV files In Ruby
I wrote my first program in Ruby that compares two CSV files, but I'm sure there are more efficient ways to do it. I tried using the Ruby CSV library at first, but it was unproductive. Please let me ...
1vote
1answer
71views
Collating creature descriptors spread across multiple stanzas
I have been using Python for only a few days, so I am trying to learn about some best practices. An explanation of what this code is supposed to do is at the bottom of this post. It is an exercise to ...
2votes
4answers
41kviews
Parsing a string to get the values of certain attributes
I have written a small method that extracts certain information from a string. An example of such a string is ...